feat: Add test to protocol contracts #95
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Test added:
ConnectorZEVM tests
ZetaConnectorZEVM
✔ Should revert if the zetaTxSender has no enough zeta
✔ Should revert if the zetaTxSender didn't allow ZetaConnector to spend Zeta token
✔ Should emit
ZetaSent
on success✔ Should transfer value and gas to fungible address
✔ Should update wzeta address if is call from fungible address
✔ Should revert if try to update wzeta address from other address
ERC20Custody tests
ERC20Custody
✔ Should update the tss address
✔ Should revert if updateTSSAddress not called by tssUpdater
✔ Should update zeta fee
✔ Should revert if updateZetaFee not called by tssUpdater
✔ Should revert if updateZetaFee is higher than max
✔ Should renounce tssUpdater
✔ Should whitelist
✔ Should revert if whitelist is not called by tss
✔ Should unwhitelist
✔ Should revert if unwhitelist is not called by tss
✔ Should emit Deposit event on deposit
✔ Should emit Deposit event and do the right math if is called twice (43ms)
✔ Should revert deposit if is paused
✔ Should revert deposit if is not whitelisted
✔ Should revert deposit if has no zeta to pay fee
✔ Should emit Withdrawn event
✔ Should revert if withdraw is not called by tss
✔ Should not revert withdraw if is paused
✔ Should revert withdraw if is not whitelisted
✔ Should not allow reentrant calls to Deposit method
✔ Should not allow reentrant calls to Witdraw method
ZRC20 tests
ZRC20Contract
✔ Should return name
✔ Should return symbol
✔ Should return decimals
✔ Should return chainId
✔ Should return coinType
✔ Should return gasLimit
✔ Should return systemContractAddress
✔ Should return totalSupply
✔ Should return balanceOf
✔ Should return allowance
✔ Should deposit if is called by fungible module
✔ Should not deposit if is not called by fungible module
✔ Should transfer
40 passing (6s)